<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateAdvertPositionsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('advert_positions', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('merchant_id')->default(0)->comment('[v1.0]店铺id, 0为公共广告位。');
            $table->string('name')->comment('[v1.0]广告位名称');
            $table->string('desc')->nullable()->comment('[v1.0]广告位描述');
            $table->integer('width')->default(0)->comment('[v1.0]广告位宽度');
            $table->integer('height')->default(0)->comment('[v1.0]广告位高度');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('advert_positions');
    }
}
